package com.ruoyi.project.data.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.data.domain.ExamAllRecords;
import com.ruoyi.project.data.domain.ExamRecords;
import com.ruoyi.project.data.service.IDatExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/system/exam")
public class DatExamController extends BaseController {
    @Autowired
    private IDatExamService iDatExamService;

    @PreAuthorize("@ss.hasPermi('data:exam:list')")
    @GetMapping("/list1")
    public AjaxResult list1(ExamRecords examRecords){
        List<ExamRecords> list =iDatExamService.findExamRecords(examRecords);
        return AjaxResult.success(list);
    }
    @GetMapping("/list2")
    public AjaxResult list2(ExamRecords examRecords){
        List<ExamAllRecords> list =iDatExamService.findExamRecordsAll(examRecords);
        System.out.println(list);
        return AjaxResult.success(list);
    }
}
